<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SocialNet</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />



    </head>
    <body>
        <%@include file="header.jsp"%>

        <div class="main">
            <div class="content">
                <div class="content_bg">
                    <div class="mainbar">
                        <div class="article">

                            <form id="form_reg" action="save_user_data.jsp" method="post">

                                <p class="first_name">
                                    <input type="text" name="first_name" id="first_name" class="validate[required] />
                                           <label for="first_name">First Name </label>
                                </p>
                                <p class="last_name">
                                    <input type="text" name="last_name" id="last_name" class="validate[required]/>
                                           <label for="last_name">Last Name</label>
                                </p>

                                <p class="email">
                                    <input type="text" name="email" id="email" class="validate[required,custom[email]]/>
                                           <label for="email">E-mail</label>
                                </p>

                                <p class="password">
                                    <input type="password" name="password" id="password" class="validate[required]" />
                                    <label for="password">Password</label>
                                </p>

                                <p class="password_confirm">
                                    <input type="password" name="password_confirm" id="password_confirm" class="validate[required,equals[password]]" />
                                    <label for="password_confirm">Confirm Password</label>
                                </p>

                                <p class="birthday">
                                    <input type="text" name="birthday" id="birthday" class="validate[required,custom[date]]"/>
                                    <label for="birthday">Birthday</label>
                                </p>

                                <p class="sex">
                                    <input type="radio" name="sex" value="male"/><label for="birthday">Male</label><br/>
                                    <input type="radio" name="sex" value="female"/><label for="birthday">Female</label>

                                </p>

                                <p class="submit">
                                    <input id="b" type="submit" value="Send" name="Send"/>
                                </p>
                            </form>

                        </div>

                    </div>

                </div>
            </div>
        </div>

        <div id="myDialog">
            Utilizador inserido com sucesso :)
        </div>

        <%@include file="footer.jsp"%>
    </body>
    <script type="text/javascript">
        
        $('#form_reg').validationEngine({
            ajaxFormValidation:true
        });
        
        $("#birthday").datepicker({
            dateFormat: 'dd/mm/yy'
        });
  
  
        $( "#myDialog" ).dialog({
            modal: true,
            autoOpen: false,
            closeOnEscape: false,
            show: "blind",
            resizable: false,
            buttons: {
                Ok: function(dados) {
                    history.go(0);
                    $("#myDialog").remove().dialog("destroy");
                    
                }
            }
            
        });
        
        $('#b').click(function() {
            $( "#myDialog" ).dialog('open');
        });
   
    </script>


</html>